package com.huixuebao.common.bean;

import com.huixuebao.common.enumeration.ResultCodeEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * @author yufatao
 * @version 1.0
 * @date 2020-11-01 20:49
 */
@Data
public class ResponseData implements Serializable {

    /**
     * 签名
     */
    private String sign;

    /**
     * 数据
     */
    private String data;

    /**
     * 响应码
     */
    private String code;

    /**
     * 响应消息
     */
    private String message;

    /**
     * 错误消息
     */
    private String errorMessage;

    public ResponseData() {

    }

    public ResponseData(ResultCodeEnum resultCode) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMessage();
    }

    public void setErrorMessage(final String errorMessage) {
        this.errorMessage = errorMessage;
    }
}